package com.llf.Service;

import com.llf.Mapper.EmployeeMapper;
import com.llf.Pojo.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class EmployeeServiceImpl implements EmployeeService{
    @Autowired
    private EmployeeMapper employeeMapper;
    @Override
    public ArrayList<Employee> getall() {
        return employeeMapper.getall() ;
    }

    @Override
    public Employee getByid(Integer id) {
        return employeeMapper.getByid(id);
    }

    @Override
    public int addEmp(Employee employee) {
        return employeeMapper.addEmp(employee);
    }

    @Override
    public int deleteById(Integer id) {
        return employeeMapper.deleteById(id);
    }

    @Override
    public int updateById(Employee employee) {
        return employeeMapper.updateById(employee);
    }
}
